/**
 * 车辆服务
 * @author xingzb
 * @date 2020-03-13
 */
import request from '@/utils/request'

export function vehicleInsurance(query) {
  return request({
    url: '/arpa-basic-api/vehicleInsurance',
    method: 'get',
    params: query
  })
}

export function delVehicleInsurance(query) {
  return request({
    url: '/arpa-basic-api/vehicleInsurance',
    method: 'delete',
    params: query
  })
}

export function addVehicleInsurance(query) {
  return request({
    url: '/arpa-basic-api/vehicleInsurance',
    method: 'post',
    params: query
  })
}

export function vehicleInsuranceCode(code) {
  return request({
    url: `/arpa-basic-api/vehicleInsurance/${code}`,
    method: 'get'
  })
}

export function updateVehicleInsurance(query) {
  return request({
    url: '/arpa-basic-api/vehicleInsurance',
    method: 'put',
    params: query
  })
}

export function vehicleRepair(query) {
  return request({
    url: '/arpa-basic-api/vehicleRepair',
    method: 'get',
    params: query
  })
}

export function delVehicleRepair(query) {
  return request({
    url: '/arpa-basic-api/vehicleRepair',
    method: 'delete',
    params: query
  })
}

export function addVehicleRepair(data) {
  return request({
    url: '/arpa-basic-api/vehicleRepair',
    method: 'post',
    data
  })
}

export function vehicleRepairCode(code) {
  return request({
    url: `/arpa-basic-api/vehicleRepair/${code}`,
    method: 'get'
  })
}

export function updateVehicleRepair(data) {
  return request({
    url: '/arpa-basic-api/vehicleRepair',
    method: 'put',
    data
  })
}

export function vehicleViolation(query) {
  return request({
    url: '/arpa-basic-api/vehicleViolation',
    method: 'get',
    params: query
  })
}

export function vehicleViolationCode(query) {
  return request({
    url: `/arpa-basic-api/vehicleViolation/detailList/`,
    method: 'get',
    params: query
  })
}

export function vehicleAccident(query) {
  return request({
    url: '/arpa-basic-api/vehicleAccident',
    method: 'get',
    params: query
  })
}

export function delVehicleAccident(query) {
  return request({
    url: '/arpa-basic-api/vehicleAccident',
    method: 'delete',
    params: query
  })
}

export function addVehicleAccident(data) {
  return request({
    url: '/arpa-basic-api/vehicleAccident',
    method: 'post',
    data
  })
}

export function vehicleAccidentCode(code) {
  return request({
    url: `/arpa-basic-api/vehicleAccident/${code}`,
    method: 'get'
  })
}

export function updateVehicleAccident(data) {
  return request({
    url: `/arpa-basic-api/vehicleAccident`,
    method: 'put',
    data
  })
}
